#pragma once
#include "ui_kit/ui_kit.h"
//#include "dui.h"
typedef std::function<void(std::string knowledge, std::string llmmodal)> AddKnowledgeCallback;

class AddKnowledgeForm : public ui_comp::WindowEx
{
public:
	AddKnowledgeForm();
	virtual ~AddKnowledgeForm(){
	};

	virtual std::wstring GetSkinFolder() override{ return L"sdp/macro/upload_parse_file_form"; };
	virtual std::wstring GetSkinFile() override{ return L"add_knowledge_form.xml"; };
	virtual std::wstring GetWindowClassName() const override { return L"AddKnowledgeForm"; };
	//virtual ui::Control* CreateControl(const std::wstring& sClass);

	virtual void InitWindow() override;
	virtual void Close(UINT nRet = IDOK) override;
	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) override;

	void InitComboLLM();
	void RegisterCallback(const AddKnowledgeCallback& cb){ m_cb = cb; };

	bool OnBtnOkClicked(ui::EventArgs* arg);

public:
	static const std::wstring kClassName;
private:
	ui::RichEdit	* m_pReDate{ nullptr };
	ui::FilterCombo	* m_pComboLLM{ nullptr };
	ui::Button		* m_pBtnOk{ nullptr };

	AddKnowledgeCallback m_cb;
};



